/*
 * SEReferenceRendererGlue.m
 *
 * /System/Library/CoreServices/System Events.app
 * osaglue 0.2.0
 *
 */

#import "SEReferenceRendererGlue.h"

@implementation SEReferenceRenderer

- (NSString *)propertyByCode:(OSType)code {
    switch (code) {
        case 'dhas': return @"CD_and_DVD_preferences";
        case 'clsc': return @"Classic";
        case 'fldc': return @"Classic_domain";
        case 'fasf': return @"Folder_Action_scripts_folder";
        case 'maca': return @"MAC_address";
        case 'posx': return @"POSIX_path";
        case 'uien': return @"UI_elements_enabled";
        case 'url ': return @"URL";
        case 'isab': return @"accepts_high_level_events";
        case 'revt': return @"accepts_remote_events";
        case 'user': return @"account_name";
        case 'acti': return @"active";
        case 'epsa': return @"activity";
        case 'epaw': return @"all_windows_shortcut";
        case 'dani': return @"animate";
        case 'appe': return @"appearance";
        case 'aprp': return @"appearance_preferences";
        case 'amnu': return @"apple_menu_folder";
        case 'spcs': return @"application_bindings";
        case 'appf': return @"application_file";
        case 'asup': return @"application_support_folder";
        case 'eppw': return @"application_windows_shortcut";
        case 'apps': return @"applications_folder";
        case 'arch': return @"architecture";
        case 'spam': return @"arrow_key_modifiers";
        case 'acha': return @"audio_channel_count";
        case 'audi': return @"audio_characteristic";
        case 'asra': return @"audio_sample_rate";
        case 'assz': return @"audio_sample_size";
        case 'autp': return @"auto_play";
        case 'apre': return @"auto_present";
        case 'aqui': return @"auto_quit_when_done";
        case 'dahd': return @"autohide";
        case 'auto': return @"automatic";
        case 'aulg': return @"automatic_login";
        case 'bkgo': return @"background_only";
        case 'dhbc': return @"blank_CD";
        case 'dhbd': return @"blank_DVD";
        case 'epbl': return @"bottom_left_screen_corner";
        case 'epbr': return @"bottom_right_screen_corner";
        case 'pbnd': return @"bounds";
        case 'bnid': return @"bundle_identifier";
        case 'busy': return @"busy_status";
        case 'capa': return @"capacity";
        case 'cinT': return @"change_interval";
        case 'pcls': return @"class_";
        case 'hclb': return @"closeable";
        case 'lwcl': return @"collating";
        case 'colr': return @"color";
        case 'conn': return @"connected";
        case 'ctnr': return @"container";
        case 'pcnt': return @"contents";
        case 'ctrl': return @"control_panels_folder";
        case 'sdev': return @"control_strip_modules_folder";
        case 'lwcp': return @"copies";
        case 'ascd': return @"creation_date";
        case 'mdcr': return @"creation_time";
        case 'fcrt': return @"creator_type";
        case 'cnfg': return @"current_configuration";
        case 'curd': return @"current_desktop";
        case 'locc': return @"current_location";
        case 'curu': return @"current_user";
        case 'dhca': return @"custom_application";
        case 'dhcs': return @"custom_script";
        case 'epdb': return @"dashboard_shortcut";
        case 'tdfr': return @"data_format";
        case 'ddra': return @"data_rate";
        case 'dsiz': return @"data_size";
        case 'asda': return @"default_application";
        case 'desc': return @"description";
        case 'dafi': return @"desk_accessory_file";
        case 'desk': return @"desktop_folder";
        case 'dtp$': return @"desktop_pictures_folder";
        case 'pdim': return @"dimensions";
        case 'dnaM': return @"display_name";
        case 'dnam': return @"displayed_name";
        case 'dpas': return @"dock_preferences";
        case 'dsze': return @"dock_size";
        case 'docu': return @"document";
        case 'docs': return @"documents_folder";
        case 'mndc': return @"double_click_minimizes";
        case 'down': return @"downloads_folder";
        case 'dupl': return @"duplex";
        case 'durn': return @"duration";
        case 'isej': return @"ejectable";
        case 'enaB': return @"enabled";
        case 'lwlp': return @"ending_page";
        case 'ects': return @"entire_contents";
        case 'lweh': return @"error_handling";
        case 'epas': return @"expose_preferences";
        case 'extz': return @"extensions_folder";
        case 'favs': return @"favorites_folder";
        case 'faxn': return @"fax_number";
        case 'file': return @"file";
        case 'atfn': return @"file_name";
        case 'asty': return @"file_type";
        case 'isfl': return @"floating";
        case 'focu': return @"focused";
        case 'faen': return @"folder_actions_enabled";
        case 'ftsm': return @"font_smoothing_limit";
        case 'ftss': return @"font_smoothing_style";
        case 'font': return @"fonts_folder";
        case 'dfmt': return @"format";
        case 'frsp': return @"free_space";
        case 'pisf': return @"frontmost";
        case 'fnam': return @"full_name";
        case 'anot': return @"full_text";
        case 'epsk': return @"function_key";
        case 'epsy': return @"function_key_modifiers";
        case 'hscr': return @"has_scripting_terminology";
        case 'help': return @"help_";
        case 'hidn': return @"hidden";
        case 'hqua': return @"high_quality";
        case 'hico': return @"highlight_color";
        case 'home': return @"home_directory";
        case 'cusr': return @"home_folder";
        case 'href': return @"href";
        case 'ID  ': return @"id";
        case 'igpr': return @"ignore_privileges";
        case 'pidx': return @"index";
        case 'dhat': return @"insertion_action";
        case 'intf': return @"interface";
        case 'spky': return @"key_modifiers";
        case 'kind': return @"kind";
        case 'laun': return @"launcher_items_folder";
        case 'dlib': return @"library_folder";
        case 'fldl': return @"local_domain";
        case 'isrv': return @"local_volume";
        case 'dplo': return @"location";
        case 'aclk': return @"log_out_when_inactive";
        case 'acto': return @"log_out_when_inactive_interval";
        case 'loop': return @"looping";
        case 'dmag': return @"magnification";
        case 'dmsz': return @"magnification_size";
        case 'maxV': return @"maximum_value";
        case 'ismn': return @"miniaturizable";
        case 'pmnd': return @"miniaturized";
        case 'deff': return @"minimize_effect";
        case 'minW': return @"minimum_value";
        case 'pmod': return @"modal";
        case 'asmo': return @"modification_date";
        case 'mdtm': return @"modification_time";
        case 'imod': return @"modified";
        case 'epso': return @"modifiers";
        case 'epsb': return @"mouse_button";
        case 'epsm': return @"mouse_button_modifiers";
        case 'mdoc': return @"movies_folder";
        case 'mtu ': return @"mtu";
        case 'dhmc': return @"music_CD";
        case '%doc': return @"music_folder";
        case 'pnam': return @"name";
        case 'extn': return @"name_extension";
        case 'ndim': return @"natural_dimensions";
        case 'fldn': return @"network_domain";
        case 'netp': return @"network_preferences";
        case 'spnm': return @"numbers_key_modifiers";
        case 'orie': return @"orientation";
        case 'pkgf': return @"package_folder";
        case 'lwla': return @"pages_across";
        case 'lwld': return @"pages_down";
        case 'pusd': return @"partition_space_used";
        case 'ppth': return @"path";
        case 'phys': return @"physical_size";
        case 'picP': return @"picture";
        case 'dhpc': return @"picture_CD";
        case 'picp': return @"picture_path";
        case 'chnG': return @"picture_rotation";
        case 'pdoc': return @"pictures_folder";
        case 'posn': return @"position";
        case 'pref': return @"preferences_folder";
        case 'prfr': return @"preferred_rate";
        case 'prfv': return @"preferred_volume";
        case 'prmd': return @"presentation_mode";
        case 'prsz': return @"presentation_size";
        case 'pvwd': return @"preview_duration";
        case 'pvwt': return @"preview_time";
        case 'ver2': return @"product_version";
        case 'pALL': return @"properties";
        case 'pubb': return @"public_folder";
        case 'qdel': return @"quit_delay";
        case 'ranD': return @"random_order";
        case 'rapl': return @"recent_applications_limit";
        case 'rdcl': return @"recent_documents_limit";
        case 'rsvl': return @"recent_servers_limit";
        case 'lwqt': return @"requested_print_time";
        case 'pwul': return @"require_password_to_unlock";
        case 'pwwk': return @"require_password_to_wake";
        case 'role': return @"role";
        case 'scmn': return @"script_menu_enabled";
        case '$scr': return @"scripting_additions_folder";
        case 'scr$': return @"scripts_folder";
        case 'sclp': return @"scroll_arrow_placement";
        case 'sclb': return @"scroll_bar_action";
        case 'scvm': return @"secure_virtual_memory";
        case 'secp': return @"security_preferences";
        case 'selE': return @"selected";
        case 'srvr': return @"server";
        case 'stbl': return @"settable";
        case 'sdat': return @"shared_documents_folder";
        case 'cfbn': return @"short_name";
        case 'assv': return @"short_version";
        case 'epde': return @"show_desktop_shortcut";
        case 'shdf': return @"shutdown_folder";
        case 'site': return @"sites_folder";
        case 'ptsz': return @"size";
        case 'scls': return @"smooth_scrolling";
        case 'spcl': return @"spaces_columns";
        case 'spen': return @"spaces_enabled";
        case 'essp': return @"spaces_preferences";
        case 'sprw': return @"spaces_rows";
        case 'spki': return @"speakable_items_folder";
        case 'sped': return @"speed";
        case 'offs': return @"start_time";
        case 'lwfp': return @"starting_page";
        case 'istd': return @"startup";
        case 'sdsk': return @"startup_disk";
        case 'empz': return @"startup_items_folder";
        case 'pspd': return @"stationery";
        case 'isss': return @"stored_stream";
        case 'sbrl': return @"subrole";
        case 'flds': return @"system_domain";
        case 'macs': return @"system_folder";
        case 'trpr': return @"target_printer";
        case 'temp': return @"temporary_items_folder";
        case 'ctxt': return @"text";
        case 'tmsc': return @"time_scale";
        case 'titl': return @"title";
        case 'ptit': return @"titled";
        case 'eptl': return @"top_left_screen_corner";
        case 'eptr': return @"top_right_screen_corner";
        case 'appt': return @"total_partition_size";
        case 'trsh': return @"trash";
        case 'ptyp': return @"type";
        case 'type': return @"type_class";
        case 'utid': return @"type_identifier";
        case 'idux': return @"unix_id";
        case 'fldu': return @"user_domain";
        case 'uti$': return @"utilities_folder";
        case 'valL': return @"value";
        case 'vers': return @"version";
        case 'dhvd': return @"video_DVD";
        case 'vcdp': return @"video_depth";
        case 'pvis': return @"visible";
        case 'visu': return @"visual_characteristic";
        case 'volu': return @"volume";
        case 'flow': return @"workflows_folder";
        case 'zone': return @"zone";
        case 'iszm': return @"zoomable";
        case 'pzum': return @"zoomed";

        default: return nil;
    }
}

- (NSString *)elementByCode:(OSType)code {
    switch (code) {
        case 'dhao': return @"CD_and_DVD_preferences_object";
        case 'domc': return @"Classic_domain_objects";
        case 'qtfd': return @"QuickTime_data";
        case 'qtff': return @"QuickTime_files";
        case 'uiel': return @"UI_elements";
        case 'xmla': return @"XML_attributes";
        case 'xmld': return @"XML_data";
        case 'xmle': return @"XML_elements";
        case 'xmlf': return @"XML_files";
        case 'actT': return @"actions";
        case 'alis': return @"aliases";
        case 'anno': return @"annotation";
        case 'apro': return @"appearance_preferences_object";
        case 'pcap': return @"application_processes";
        case 'capp': return @"applications";
        case 'atts': return @"attachment";
        case 'catr': return @"attribute_runs";
        case 'attr': return @"attributes";
        case 'audd': return @"audio_data";
        case 'audf': return @"audio_files";
        case 'broW': return @"browsers";
        case 'busi': return @"busy_indicators";
        case 'butT': return @"buttons";
        case 'cha ': return @"characters";
        case 'chbx': return @"checkboxes";
        case 'colW': return @"color_wells";
        case 'colr': return @"colors";
        case 'ccol': return @"columns";
        case 'comB': return @"combo_boxes";
        case 'conF': return @"configurations";
        case 'pcda': return @"desk_accessory_processes";
        case 'dskp': return @"desktops";
        case 'ditm': return @"disk_items";
        case 'cdis': return @"disks";
        case 'dpao': return @"dock_preferences_object";
        case 'docu': return @"documents";
        case 'doma': return @"domains";
        case 'draA': return @"drawers";
        case 'epao': return @"expose_preferences_object";
        case 'cpkg': return @"file_packages";
        case 'file': return @"files";
        case 'foac': return @"folder_actions";
        case 'cfol': return @"folders";
        case 'sgrp': return @"groups";
        case 'grow': return @"grow_areas";
        case 'imaA': return @"images";
        case 'incr': return @"incrementors";
        case 'dhip': return @"insertion_preference";
        case 'intf': return @"interfaces";
        case 'cobj': return @"items";
        case 'list': return @"lists";
        case 'doml': return @"local_domain_objects";
        case 'loca': return @"locations";
        case 'logi': return @"login_items";
        case 'mbri': return @"menu_bar_items";
        case 'mbar': return @"menu_bars";
        case 'menB': return @"menu_buttons";
        case 'menI': return @"menu_items";
        case 'menE': return @"menus";
        case 'movd': return @"movie_data";
        case 'movf': return @"movie_files";
        case 'domn': return @"network_domain_objects";
        case 'neto': return @"network_preferences_object";
        case 'outl': return @"outlines";
        case 'cpar': return @"paragraphs";
        case 'popB': return @"pop_up_buttons";
        case 'pset': return @"print_settings";
        case 'prcs': return @"processes";
        case 'proI': return @"progress_indicators";
        case 'plif': return @"property_list_files";
        case 'plii': return @"property_list_items";
        case 'radB': return @"radio_buttons";
        case 'rgrp': return @"radio_groups";
        case 'reli': return @"relevance_indicators";
        case 'crow': return @"rows";
        case 'epsc': return @"screen_corner";
        case 'scpt': return @"scripts";
        case 'scra': return @"scroll_areas";
        case 'scrb': return @"scroll_bars";
        case 'seco': return @"security_preferences_object";
        case 'svce': return @"services";
        case 'sheE': return @"sheets";
        case 'epst': return @"shortcut";
        case 'sliI': return @"sliders";
        case 'spsp': return @"spaces_preferences_object";
        case 'spst': return @"spaces_shortcut";
        case 'splg': return @"splitter_groups";
        case 'splr': return @"splitters";
        case 'sttx': return @"static_texts";
        case 'doms': return @"system_domain_objects";
        case 'tabg': return @"tab_groups";
        case 'tabB': return @"tables";
        case 'ctxt': return @"text";
        case 'txta': return @"text_areas";
        case 'txtf': return @"text_fields";
        case 'tbar': return @"tool_bars";
        case 'trak': return @"tracks";
        case 'domu': return @"user_domain_objects";
        case 'uacc': return @"users";
        case 'vali': return @"value_indicators";
        case 'cwin': return @"windows";
        case 'cwor': return @"words";

        default: return nil;
    }
}

+ (NSString *)render:(id)object {
    return [SEReferenceRenderer render: object withPrefix: @"SE"];
}

@end
